<#assign domain="${ctx.contextPath}" />
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
	<meta name="renderer" content="webkit">
	<title>天眼风控系统</title>
    <link rel="stylesheet" href="${domain}/static/css/common/base.css">
	<link rel="stylesheet" href="${domain}/static/css/common/bootstrap.min.css">
	<link rel="stylesheet" href="${domain}/static/css/common/header.css">
	<script src="${domain}/static/js/jquery-3.2.1.slim.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script
</head>
<body>
	<!--头部导航-->
	<div class="pub-header">
		<div class="logo">欢迎使用天眼风控系统</div>
		<div class="dropdown">
			<div class="user-info dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
				<span class="icon-user"><img src="${domain}/static/img/user.png" alt="用户名"></span>
				<span class="username" id="name"></span>
				<img src="${domain}/static/img/drop.png" alt="下拉箭头">
			</div>
			<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
				<li><a href="javascript:void(0);" id="loginout" data-toggle="modal" data-target="#exampleModal">退出登录</a></li>
				<li><a href="${domain}/updateUser" target="myFrame">修改密码</a></li>
			</ul>
		</div>
	</div>
	<div class="content">
	<!--侧边导航-->
		<div class="side-bar">
			<ul>
			<#list leftMenuEntityList as left>
				<li id="antiFraudId" style="" >
					<a href="${domain}/${left.methodUrl}" target="myFrame" class="tab-nav">
						<div class="contain"><img src="${domain}/${left.imgUrl}" alt="${left.imgAlt}"></div>
						<div class="contain"><p>${left.imgAlt}</p></div>
					</a>
				</li>
				</#list>
			</ul>
		</div>
		<!--显示内容-->
		<div class="right">
			<iframe src="${domain}/antifraud/toIndex" name="myFrame" style="width: 100%; height: 100%;" frameborder="0" scrolling="auto"></iframe>
		</div>
	<div>
	
	
	
//	<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">提示信息</h4>
      </div>
      <div class="modal-body">
        <p>是否退出登录?</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" id="sure">确定</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
      </div>
    </div>
  </div>
</div>
	
</body>
<script type="text/javascript">
 
 var domain ='${domain}';

$('#exampleModal').on('hidden.bs.modal', function (e) {
  console.log('返回');
});

$('#sure').on("click",function(){
	　           $.ajax({
					type : 'POST',
					url : domain+'/loginout',
					dataType : 'json',
					success : function(data) {
	
						if(data.success){
				   			location.href =  domain+"/index";
			    		}else{
				  			location.href =  domain+"/index";
			    		}   
				    }
	       });
	
	
});

$(function() {
	
	$(".dropdown-menu").hover(function(){
		
		console.log(1);
		
	},function() {
		$(this).hide();
	});
	
	$('#dropdownMenu1').click(function(){
		
		$('.dropdown-menu').show();
		
	});
	
  $(".side-bar li").on('click',function() {
  	$(this).addClass('active').siblings().removeClass('active');
  })

			
	    $.ajax({
			type : 'POST',
			url : domain+'/top',
			dataType : 'json',
			success : function(data) {
			    if(data.success){
				   $('#name').text(data.user.name);
			    }else{
				   location.href =  domain+"/index";
			    }
		     }
		});
			

});
</script>
</html>
